@echo off



set IIP_DB_NAME=IIP_Work_Mus
set IIP_DB_LOCATION=C:\MSSQL\Data


GOTO CASE_%1%

:CASE_START
	InvestmentIntelligence.TaskRunner.exe -t AppConfigConfiguredCompositeTask --file-name TaskCongurations\Mus-Work --task-name Start --force-all || goto :fail
	GOTO END_SWITCH

:CASE_RUN
	InvestmentIntelligence.TaskRunner.exe -t AppConfigConfiguredCompositeTask --file-name TaskCongurations\Mus-Work --task-name Run --force-all || goto :fail
	if %2.==/backupfiles. (
	GOTO CASE_BACKUP 
	)
    GOTO END_SWITCH
	
:CASE_BACKUP
	InvestmentIntelligence.TaskRunner.exe -t AppConfigConfiguredCompositeTask --file-name TaskCongurations\Mus-Work --task-name BackUp --force-all || goto :fail
    GOTO END_SWITCH

:CASE_UPDATEDATABASE
	InvestmentIntelligence.TaskRunner.exe -t AppConfigConfiguredCompositeTask --file-name TaskCongurations\Mus-Work --task-name UpdateDataBase --force-all || goto :fail
    GOTO END_SWITCH

:END_SWITCH
	exit /b 1

:fail
echo FAILED
exit /b 1